public int foo(int size, int max) {

	try {
	size=(long)stream.available();
	} catch (IOException e) {
	}
	return size;
}
